<template>
  <div class="unAssess flex-col">
    <div class="item flex-col" v-for="(item, index) in data" :key="index">
      <div class="header">
        <div class="left">
          <img
            :src="item.coverUrl || changeUrl"
            alt=""
            class="img"
            mode="heightFix"
          />
        </div>
        <div class="right flex-col">
          <p class="title ellipsis_1">
            {{
              item.goodsName ||
              "苹果13Promax 5G手机全新国行全苹果13Promax 5G手机全新国行全"
            }}
          </p>
          <p class="info">套餐:{{ item.specName }}【到期需归还/可买断】</p>
          <p class="price">
            总租金:￥<span class="pricefree">{{ item.allRentFee || 0 }}</span
            >（{{ item.startEndTimeString }}期）
          </p>
        </div>
      </div>
      <view class="btns">
        <view class="btn" @tap.stop="commentList(item)">去评价</view>
      </view>
    </div>
    <NoData v-if="data.length === 0" />
  </div>
</template>
<script>
import NoData from "../../../components/noData.vue";
export default {
  name: "unAssess",
  components: { NoData },
  data() {
    return {
      data: [
        {
          userContent: "京哈跟进哈感觉好贵",
          coverUrl: "../../../static/icones/pic1.png",
          goodsName:
            "5G手机全新国行全苹果13Promax5G手机全新国行全苹果13P5G手机全新国行全苹果13P",
          specName: "【到期需归还",
          allRentFee: 444,
          startEndTimeString: "0",
          createTime: "2022-07-13",
        },
        {
          userContent: "京哈跟进哈感觉好贵",
          coverUrl: "../../../static/icones/pic1.png",
          goodsName:
            "5G手机全新国行全苹果13Promax5G手机全新国行全苹果13P5G手机全新国行全苹果13P",
          specName: "【到期需归还",
          allRentFee: 444,
          startEndTimeString: "0",
          createTime: "2022-07-13",
        },
      ],
      config: {
        page: 1,
        size: 10,
        finish: false,
      },
      changeUrl: "../../../static/icones/pic1.png",
    };
  },
  mounted() {
    // this.resetData();
  },
  methods: {
    commentList({ id }) {
      uni.navigateTo({ url: `/pagesMy/commentList/index?id=${id}` });
    },

    getData() {
      //   this.$http
      //     .request({
      //       url: "/order/orderList.json",
      //       data: {
      //         pageNumber: this.config.page,
      //         pageSize: this.config.size,
      //         status: 7,
      //       },
      //     })
      //     .then(({ data: { orderInfoDTOList } }) => {
      //       this.data.push(...orderInfoDTOList);
      //       if (orderInfoDTOList.length < this.config.size) {
      //         this.config.finish = true;
      //       } else {
      //         this.config.finish = false;
      //       }
      //     });
      // },
      // resetData() {
      //   this.data = [];
      //   this.config.page = 1;
      //   this.config.finish = false;
      //   this.getData();
    },
  },
};
</script>
<style lang="scss">
.unAssess {
  width: 100%;
  padding: 12px;
  .item {
    width: 100%;
    min-height: 117px;
    padding: 12px;
    position: relative;
    border-radius: 10px;
    margin-bottom: 8px;
    background-color: #fff;
    box-shadow: 0px 8px 30px 0px rgba(0, 0, 0, 0.02);
    .header {
      min-height: 90px;
      display: flex;
      .left {
        width: 82px;
        height: 82px;
        background-color: #f9f9f9;
        .img {
          width: 82px;
          height: 82px;
        }
      }
      .right {
        margin-left: 8px;
        width: 75%;
        .title {
          color: #333333;
          font-weight: bold;
          font-size: 14px;
          line-height: 20px;
        }
        .info {
          color: #aaaaaa;
          font-size: 12px;
          line-height: 17px;
          margin-top: 6px;
        }
        .price {
          color: #333333;
          font-size: 14px;
          line-height: 20px;
          margin-top: 6px;
          .pricefree {
            color: #3d3d3d;
            font-size: 18px;
            font-family: DINPro-Bold;
            font-weight: 700;
          }
        }
      }
    }

    .btns {
      width: 100%;
      height: 34px;
      display: flex;
      justify-content: flex-end;
      align-items: center;
      .btn {
        width: 76px;
        height: 34px;
        line-height: 34px;
        text-align: center;
        color: #157afe;
        font-size: 14px;
        border: 1px solid #157afe;
        border-radius: 17px;
      }
    }
  }
}
</style>
